home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / MPW_Only / InstallIntoMPW
Encoding:
Text File  |  1997-08-08  |  1.7 KB  |  59 lines  |  [TEXT/MPS ]

  1. #
  2. #     File:        InstallIntoMPW
  3. #     Copyright:    © 1997 by Apple Computer, Inc. All rights reserved.
  4. #     Version:    Universal Interfaces 3.0.1, August 8, 1997
  5. #
  6. #    Purpose:    This script will help install updates to Universal Interfaces
  7. #                into the MPW environment.
  8. #
  9. #     Usage:         Run this file in MPW.  It will generate the commands needed
  10. #                to update the running MPW to the latest Universal Interfaces.
  11. #
  12. #
  13. #
  14.  
  15. set exit 0
  16.  
  17. If "{CIncludes}"
  18.     If "{CIncludes}" =~ /(≈:)®1Interfaces:CIncludes:/
  19.         Set InterfacesAndLibrariesDir "{®1}"
  20.     End
  21. End
  22.  
  23. If !`Exists "{InterfacesAndLibrariesDir}"`
  24.     If "{ShellDirectory}"
  25.         If `Exists "{ShellDirectory}Interfaces:CIncludes:"`
  26.             Set InterfacesAndLibrariesDir "{ShellDirectory}"
  27.         Else If `Exists "{ShellDirectory}:Interfaces&Libraries:CIncludes:"`
  28.             If "{ShellDirectory}" =~ /(≈:)®1IMPW:/
  29.                 Set InterfacesAndLibrariesDir "{®1}Interfaces&Libraries:"
  30.             End
  31.         End
  32.     End
  33. End
  34.  
  35. If (!"{InterfacesAndLibrariesDir}") || (!`Exists "{InterfacesAndLibrariesDir}"`)
  36.     Echo "### Error: Could not find Interfaces&Libraries. Try setting ∂{CIncludes∂}" >dev:stderr
  37.     Exit 1
  38. End
  39.  
  40.  
  41. Set ThisScript `files "{0}" -f`
  42. If "{ThisScript}" =~ /(≈:)®1MPW_Only:InstallIntoMPW/
  43.     Set UI "{®1}"
  44. End
  45.  
  46. If (!`Exists "{UI}MPW_Only:"`) || (!`Exists "{UI}Universal:"`)
  47.     Echo "### Error: Script "{0}" not in Interfaces&Libraries folder" >dev:stderr
  48.     Exit 1
  49. End
  50.  
  51.  
  52. BackUp -from "{UI}MPW_Only:Interfaces:"                 -to "{InterfacesAndLibrariesDir}Interfaces:" -r -a
  53. BackUp -from "{UI}MPW_Only:Libraries:StubLibraries:"    -to "{InterfacesAndLibrariesDir}Libraries:SharedLibraries:" -r -a
  54. BackUp -from "{UI}Universal:Interfaces:"                 -to "{InterfacesAndLibrariesDir}Interfaces:" -r -a
  55. BackUp -from "{UI}Universal:Libraries:StubLibraries:"     -to "{InterfacesAndLibrariesDir}Libraries:SharedLibraries:" -r -a
  56.  
  57.